package cn.stylefeng.guns.modular.knowledge.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.knowledge.entity.KnowledgeContent;
import cn.stylefeng.guns.modular.knowledge.model.params.KnowledgeContentParam;
import cn.stylefeng.guns.modular.knowledge.model.result.KnowledgeContentResult;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 知识点 服务类
 * </p>
 *
 * @author CHENCHEN
 * @since 2022-07-21
 */
public interface KnowledgeContentService extends IService<KnowledgeContent> {

    /**
     * 新增
     *
     * @author CHENCHEN
     * @Date 2022-07-21
     */
    void add(KnowledgeContentParam param);

    /**
     * 删除
     *
     * @author CHENCHEN
     * @Date 2022-07-21
     */
    void delete(KnowledgeContentParam param);

    /**
     * 更新
     *
     * @author CHENCHEN
     * @Date 2022-07-21
     */
    void update(KnowledgeContentParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author CHENCHEN
     * @Date 2022-07-21
     */
    KnowledgeContentResult findBySpec(KnowledgeContentParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author CHENCHEN
     * @Date 2022-07-21
     */
    List<KnowledgeContentResult> findListBySpec(KnowledgeContentParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author CHENCHEN
     * @Date 2022-07-21
     */
     LayuiPageInfo findPageBySpec(KnowledgeContentParam param);

    /**
     * 根据专业查询知识点
     * @param specialtyId
     * @return
     */
    List<Map<String, Object>> getKnowledgeList(Long specialtyId);

    KnowledgeContentResult selectDetailById(Long id);

}
